package com.example.administrator.managesystem.view;

import android.app.Dialog;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.administrator.managesystem.R;

import java.util.List;


public class DeleteGoodsDialog extends Dialog {
    private Button button_cancel,button_send;//定义取消与确认按钮

    public DeleteGoodsDialog(Context context) {

        //设置对话框样式
        super(context, R.style.mdialog);

        //通过LayoutInflater获取布局
        View view = LayoutInflater.from(getContext()).inflate(R.layout.dialog_delete_goods, null);
        button_cancel = view.findViewById(R.id.btn_cancel);    //获取取消按钮
        button_send = view.findViewById(R.id.btn_send);  //获取确认退出按钮
        setContentView(view);  //设置显示的视图

//        button_send.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//                enterListener.onEnterClick(v);
//            }
//        });
    }

    //取消监听
    public void setOnCancelListener(View.OnClickListener listener) {
        button_cancel.setOnClickListener(listener);
    }
    //取消监听
    public void setOnEnterListener(View.OnClickListener listener) {
        button_send.setOnClickListener(listener);
    }
}
